<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            width: 600px;
            height: 600px;
            border: 2px solid gray;
        }
        .box div{
            width: 100px;
            height: 100px;
            background: red;
            border: 1px solid black;
        }

        .box div:nth-child(1){
            transform: translateX(400px);
        }
        .box div:nth-child(2){
            transform: translateX(400px) rotate(45deg);
        }
        .box div:nth-child(3){
            transform: rotate(45deg) translateX(400px);
            /* 先旋转再位移会导致坐标轴也跟着旋转，位移时的x轴已经偏移 */
        }
    </style>
</head>
<body>
    <div class="box">
        <div></div>
        <div></div>
        <div></div>
    </div>
</body>
</html>